// 保存文章到草稿箱
// 定义state
export const state = () => ({
    draftLocallist: []
})

//定义mutations--用来给state中的成员赋值
export const mutations = {
    saveDraftPost(state, data) {
        state.draftLocallist.unshift(data)
    },
    delDraftPost(state, i) {
        state.draftLocallist.splice(i, 1)
    },
    delAllDraft(state, data) {
        state.draftLocallist = data
    },
}